<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <p>用户姓名:<input type="text"></p>
    <p>电子邮箱:<input type="text"></p>
    <p>手机号码:<input type="text"></p>
    <p>个人描述:<input type="text"></p>
</body>
</html>
<script>
    var inputs=document.getElementsByTagName('input')
    for(var i=0;i<inputs.length;i++){
        inputs[i].onkeydown=next;
    }
    function next(e){
        if(e.keycode===13){
            for(var i=0;i<inputs.length;i++){
                if(inputs[i]===this){
                    var index=i+1>=inputs.length ? 0:i+1;
                    break;
                }
            }
            if(inputs[index].type==='text'){
                inputs[index].focus();
            }
        }
    }
</script>